package com.foreveross.taskservice.taskcache;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

/**
 * 查询条件
 * @author guokenye
 *
 */
public final class QueryCondition implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = -7987700706652452156L;
	
	private final Map<String,Object> conditionMap=new HashMap<String, Object>();
	
	
	public Map<String,Object> getConditionMap(){
		return new HashMap<String, Object>(this.conditionMap);
	}
	
	/**
	 * 添加字符串类型的查询条件值
	 * @param conditionKey
	 * @param conditionValue
	 */
	public void put(String conditionKey,String conditionValue){
		putObject(conditionKey,conditionValue);
	}
	
	
	
	private void putObject(String queryIndex,Object value){
		if(value==null){return;}
		this.conditionMap.put(queryIndex, value);
	}
}
